//*********************************************************************
//		Copyright (c) 2003 - 2008 Microsoft Corporation.
//      This code is provided under Microsoft Public License, which can be found at
//      http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx 
//
// @File: FormWBase.cs
//
// Purpose: Installation & Configuration Wizard - base screen (parent of Wizard screens)
//          Provides common screen properties, panels, buttons 
//           and virtual _click functions (and registers Click events delegates)
//
// Notes: 
//
//
//	
// History: 
//     @Version: V2.1
//
//     08/18/08 PGV 2.1.001.0 Starting V2.1 (based on 2.0.030.0 code)
//
// @EndHeader@
//*********************************************************************

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace H2V2.ConfigUtility
{
	/// <summary>
	/// Summary description for FormW1.
	/// </summary>
	public class FormWbase : System.Windows.Forms.Form
	{
		protected System.Windows.Forms.Panel panel1;
		protected System.Windows.Forms.Panel panel2;
		protected System.Windows.Forms.Button btCancel;
		protected System.Windows.Forms.Button btNext;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public FormWbase()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.panel1 = new System.Windows.Forms.Panel();
			this.panel2 = new System.Windows.Forms.Panel();
			this.btNext = new System.Windows.Forms.Button();
			this.btCancel = new System.Windows.Forms.Button();
			this.panel2.SuspendLayout();
			this.SuspendLayout();
			// 
			// panel1
			// 
			this.panel1.BackColor = System.Drawing.SystemColors.Window;
			this.panel1.Location = new System.Drawing.Point(0, 0);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(640, 128);
			this.panel1.TabIndex = 0;
			// 
			// panel2
			// 
			this.panel2.BackColor = System.Drawing.SystemColors.Window;
			this.panel2.Controls.Add(this.btNext);
			this.panel2.Controls.Add(this.btCancel);
			this.panel2.Location = new System.Drawing.Point(-16, 408);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(656, 72);
			this.panel2.TabIndex = 1;
			// 
			// btNext
			// 
			this.btNext.BackColor = System.Drawing.SystemColors.Control;
			this.btNext.Location = new System.Drawing.Point(504, 24);
			this.btNext.Name = "btNext";
			this.btNext.Size = new System.Drawing.Size(104, 23);
			this.btNext.TabIndex = 0;
			this.btNext.Text = "Next ";
			this.btNext.Click += new System.EventHandler(this.btNext_Click);
			// 
			// btCancel
			// 
			this.btCancel.BackColor = System.Drawing.SystemColors.Control;
			this.btCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btCancel.Location = new System.Drawing.Point(376, 24);
			this.btCancel.Name = "btCancel";
			this.btCancel.Size = new System.Drawing.Size(104, 23);
			this.btCancel.TabIndex = 1;
			this.btCancel.Text = "Cancel";
			this.btCancel.Click += new System.EventHandler(this.btCancel_Click);
			// 
			// FormWbase
			// 
			this.AcceptButton = this.btNext;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.btCancel;
			this.ClientSize = new System.Drawing.Size(640, 478);
			this.ControlBox = false;
			this.Controls.Add(this.panel2);
			this.Controls.Add(this.panel1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "FormWbase";
			this.ShowInTaskbar = false;
			this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "SQLH2 Installation & Configuration Wizard";
			this.panel2.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		protected virtual void btNext_Click(object sender, System.EventArgs e)
		{
			this.DialogResult = DialogResult.OK;
			Close ();
		}

		protected virtual void btCancel_Click(object sender, System.EventArgs e)
		{
			this.DialogResult = DialogResult.Cancel;
			Close ();
		}
	}
}
